using System.Collections.Generic;
using UnityEngine;

public class MeshDataMeshBuilder : MeshBuilder
{
   private MeshData meshData;

   virtual protected MeshData GetMeshData()
   {
      return new MeshData();
   }

   protected override void Preprocess()
   {
      meshData = GetMeshData();
   }

   sealed protected override List<Vector3> CalculateVertices()
   {
      return meshData.vertices;
   }

   sealed protected override List<int> CalculateTriangles()
   {
      return meshData.triangles;
   }

   sealed protected override List<Vector3> CalculateNormals()
   {
      return meshData.normals;
   }

   sealed protected override List<Vector2> CalculateUvs(List<Vector3> vertices)
   {
      return meshData.uvs;
   }
}